home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / MENU_UTL / DESIGN / IBMLIB1.INC < prev    next >
Text File  |  1988-12-28  |  18KB  |  724 lines

  1. procedure cls;
  2. begin
  3.    gotoxy(1,1);
  4.    clrscr
  5. end;
  6.  
  7. procedure setcurs(n:Integer);
  8. { Set cursor size to n scan lines }
  9. Type
  10.    String80 = String[80];
  11.  
  12. var
  13.    regs : registers;
  14.  
  15. begin
  16.    if not (n in [1..7]) then
  17.    n := 6;                { One scan line if out of bounds }
  18.    regs.ah := 1;          { Set cursor size }
  19.    regs.ch := 7-n;        { Top scan line   }
  20.    regs.cl := 7;          { Bottom scan line }
  21.    intr($10,regs);        { Call video I/O  }
  22. end;
  23.  
  24. Procedure Beep;
  25.    Begin
  26.       Write(chr(7))
  27.    end; { Beep }
  28.  
  29. Function Yes : Boolean;
  30.    Const
  31.       YesNo : Set of Char = ['Y','y','N','n'];
  32.  
  33.    Var
  34.       C : Char;
  35.       Ok, Ans : Boolean;
  36.  
  37.    Begin
  38.       Repeat
  39.          C := ReadKey;
  40.          Ok := (C in YesNo);
  41.          If Not OK then Beep;
  42.       Until OK;
  43.       Ans := (UpCase(C) = 'Y');
  44.       if Ans then write('Y') else
  45.       write('N');
  46.       Yes := Ans;
  47.    end; { Yes }
  48.  
  49. Function YYes : Boolean;
  50. { Gets Yes/No answer while keeping up clock }
  51.    Const
  52.       YesNo : Set of Char = ['Y','y','N','n'];
  53.  
  54.    Var
  55.       C : Char;
  56.       Ok, Ans : Boolean;
  57.  
  58.    Begin
  59.       Repeat
  60.          C := ReadKey;
  61.          Ok := (C in YesNo);
  62.          If Not OK then Beep;
  63.       Until OK;
  64.       Ans := (UpCase(C) = 'Y');
  65.       YYes := Ans;
  66.    end; { Yes }
  67.  
  68. { -------------------------------------------------------- }
  69. Function Spaces(n:Integer):String80;
  70. var
  71.    i : Integer;
  72.    Sp : String80;
  73. begin
  74.    sp := '';
  75.    for i := 1 to n do
  76.       sp := concat(sp,#32);
  77.    Spaces := sp
  78. end;
  79.  
  80. function blank(str:String80):boolean;
  81. var
  82.    i : Integer;
  83.    temp : boolean;
  84.  
  85. begin
  86.    temp := true;
  87.    for i := 1 to length(str) do
  88.    if str[i] <> #32 then temp := false;
  89.    blank := temp
  90. end;
  91.  
  92. { ----------------------------------------------------- }
  93. procedure fwrite(col,row,attrib:byte;str:String80);
  94. { Write directily to video memory }
  95. begin
  96. inline
  97. ($1E/$1E/$8A/$86/row/$B3/$50/$F6/$E3/$2B/$DB/$8A/$9E/col/
  98.  $03/$C3/$03/$C0/$8B/$F8/$be/$00/$00/$8A/$BE/attrib/
  99.  $8a/$8e/str/$22/$c9/$74/$3e/$2b/$c0/$8E/$D8/$A0/$49/$04/
  100.  $1F/$2C/$07/$74/$22/$BA/$00/$B8/$8E/$DA/$BA/$DA/$03/$46/
  101.  $8a/$9A/str/$EC/$A8/$01/$75/$FB/$FA/$EC/$A8/$01/$74/$FB/
  102.  $89/$1D/$47/$47/$E2/$Ea/$2A/$C0/$74/$10/$BA/$00/$B0/
  103.  $8E/$DA/$46/$8a/$9A/str/$89/$1D/$47/$47/$E2/$F5/$1F);
  104. end;
  105.  
  106. procedure time(var line:String15; var AmPm:String5);
  107. var
  108.    register : Registers;
  109.    Hour,Min,Sec,Hun : Integer;
  110.    hours, minutes, seconds : String[5];
  111. begin
  112.    register.AX := $2C00;
  113.    MsDos(Register);
  114.    With Register do
  115.       begin
  116.          Hour := Cx shr 8;
  117.          Min  := Cx and $00FF;
  118.          Sec  := Dx shr 8;
  119.          Hun  := Dx and $00FF;
  120.       end;
  121.       if hour > 11 then
  122.       ampm := ' PM' else
  123.       ampm := ' AM';
  124.  
  125.       if hour > 12 then
  126.          hour := hour - 12;
  127.       str(hour:2,hours);
  128.       if hours[1] = #32 then hours[1] := '0';
  129.       if hours = '00' then hours := '12';
  130.       str(min:2,minutes);
  131.       if minutes[1] = #32 then minutes[1] := '0';
  132.       str(sec:2,seconds);
  133.       if seconds[1] = #32 then seconds[1] := '0';
  134.  
  135.    line := Hours+':'+Minutes+':'+Seconds;
  136. end;
  137. { -------------------------------------------------------- }
  138. Procedure Date(var line:String15);
  139. Type
  140.    Str9 = String[9];
  141.  
  142. Const
  143.    Dates : Array[1..7] of str9 = ('Sunday','Monday','Tuesday','Wednesday',
  144.                                     'Thursday','Friday','Saturday');
  145. Var
  146.    Regs : Registers;
  147.    DayNum,Month,Day,Year : Integer;
  148.    MStr,DStr,YStr : String[2];
  149. Begin
  150.    Regs.Ax := $2A00;
  151.    MsDos(Regs);
  152.    DayNum := (Regs.Ax and $00FF) + 1;
  153.    Month  := Regs.Dx shr 8;
  154.    Day    := Regs.Dx and $00FF;
  155.    Year   := Regs.Cx - $76C; { Subtract 1900 so we get a two digit year }
  156.    str(month:2,mstr);
  157.    str(day:2,dstr);
  158.    str(year:2,ystr);
  159.    if mstr[1] = #32 then mstr[1] := '0';
  160.    if dstr[1] = #32 then dstr[1] := '0';
  161.    if ystr[1] = #32 then dstr[1] := '0';
  162.    line := mstr+'/'+dstr+'/'+ystr+'.'
  163. end;
  164.  
  165. procedure display_datetime;
  166. begin
  167.    date(The_Date);
  168.    time(The_Time,AmPm);
  169.    fwrite(50,2,lbg*16+lfg,The_Date+' - '+The_Time+AmPm)
  170. end;
  171.  
  172. procedure clock;
  173. begin
  174.    if not clockon then exit;
  175.    while not keypressed do
  176.    begin
  177.       temp := temptime;
  178.       time(temptime,AmPm);
  179.       if temp <> temptime then
  180.       display_datetime
  181.    end;
  182. end;
  183.  
  184. { -------------------------------------------------------- }
  185. Function Color_Monitor: Boolean;
  186. const
  187.    ZeroSeg     = $0000;
  188.    ConfigWorld = $0410;
  189. var
  190.    Flag : byte;
  191.    Ch   : char;
  192. begin
  193.    Flag := (Mem [ZeroSeg:ConfigWorld])
  194.             and $30;
  195.    if Flag = $20 then
  196.       Color_Monitor := true
  197.    else if Flag = $30 then
  198.       Color_Monitor := false
  199.    else
  200.    begin
  201.       Make_Window(10,10,70,15,f,b);
  202.       writeln('I can`t determine what kind of monitor you have.');
  203.       writeln('The default will be Monochrome.');
  204.       Color_Monitor := false;
  205.       writeln;
  206.       writeln('Press any key...');
  207.       Ch := ReadKey;
  208.       Remove_Window
  209.    end;
  210. end;
  211.  
  212. { -------------------------------------------------------- }
  213. function Strings(n:Integer;ch:char):String80;
  214. { Emulate the BASIC STRING$ function }
  215. var
  216.    i : Integer;
  217.    temp : String80;
  218. begin
  219.    temp := '';
  220.    for i := 1 to n do
  221.    temp := concat(temp,ch);
  222.    Strings := temp
  223. end;
  224.  
  225.  
  226. procedure GetIntVal(Var Value:Integer; xpos,ypos:Integer;
  227.           var up,q:boolean);
  228. { Do error checking on Integer number input }
  229. var
  230.    tempString, tempval : String10;
  231.    code : Integer;
  232. begin
  233.       str(value,tempval);
  234.       gotoxy(xpos,ypos);
  235.       repeat
  236.       tempString := '';
  237.       EditLine(TempString,8,WhereX,WhereY,LegalChars,Term,Tc);
  238.       Up := Tc = UpKey;
  239.       q  := Tc = Esc;
  240.       if tempString = '' then exit;
  241.       val(tempString,value,code);
  242.       if code > 0 then
  243.          begin
  244.             write(#7);
  245.             Make_Window(20,9,60,12,f,black);
  246.             write('Integer number expected.');
  247.             delay(1000);
  248.             Remove_Window;
  249.             gotoxy(xpos,ypos);
  250.             write('     ');
  251.             gotoxy(xpos,ypos);
  252.          end;
  253.       until code = 0
  254. end;
  255.  
  256. { -------------------------------------------------------- }
  257. procedure GetRealVal(Var Value:real; xpos,ypos:Integer;
  258.                      Var up,q:boolean);
  259. { Do error checking on real number input }
  260. var
  261.    tempString, tempval : String10;
  262.    code : Integer;
  263.  
  264. begin
  265.       up := false;
  266.       q  := false;
  267.       str(value,tempval);
  268.       gotoxy(xpos,ypos);
  269.       repeat
  270.       EditLine(tempString,8,wherex,wherey,LegalChars,Term,Tc);
  271.       Up := Tc = UpKey;
  272.       q  := Tc = Esc;
  273.       val(tempString,value,code);
  274.       if code > 0 then
  275.          begin
  276.             write(#7);
  277.             Make_Window(20,9,60,12,f,b);
  278.             write('Real number expected.');
  279.             delay(1000);
  280.             Remove_Window;
  281.             gotoxy(xpos,ypos);
  282.             write('     ');
  283.             gotoxy(xpos,ypos);
  284.          end;
  285.       until code = 0
  286. end;
  287.  
  288. function Exist(Filename:String80):boolean;
  289. VAR infile:text;
  290.  
  291. Begin                        { Find out if the file exists }
  292.    Assign(Infile,Filename);
  293.    {$I-}
  294.    Reset(infile);
  295.    close(infile);
  296.    {$I+}
  297.    Exist := (IOresult = 0);
  298. end;
  299.  
  300.  
  301. function uppercase(progname:String80): String80;
  302. { Convert a String to upper case }
  303. var
  304.    i : Integer;
  305. begin
  306.    for i := 1 to length(progname) do
  307.       progname[i] := upcase(progname[i]);
  308.    uppercase := progname
  309. end;
  310.  
  311. Procedure Exec(s : String80);
  312. { Execute DOS command or Program }
  313. Var
  314.    save_ax : Integer;
  315. Const
  316.    save_ss : Integer = 0;
  317.    save_sp : Integer = 0;
  318. BEGIN
  319.     s[Length(s)+1] := ^M;
  320.     INLINE(
  321.       $1E/                    {   push    ds                   }
  322.       $55/                    {   push    bp                   }
  323.       $2E/$8C/$16/save_ss/    {   mov     cs:[save_ss],ss      }
  324.       $2E/$89/$26/save_sp/    {   mov     cs:[save_sp],sp      }
  325.       $8C/$D0/                {   mov     ax,ss                }
  326.       $8E/$D8/                {   mov     ds,ax                }
  327.       $8D/$76/<s/             {   lea     si,s[bp]             }
  328.       $CD/$2E/                {   int     2eh                  }
  329.       $2E/$8E/$16/save_ss/    {   mov     ss,cs:[save_ss]      }
  330.       $2E/$8B/$26/save_sp/    {   mov     sp,cs:[save_sp]      }
  331.       $5D/                    {   pop     bp                   }
  332.       $1F/                    {   pop     ds                   }
  333.       $89/$46/<save_ax        {   mov     save_ax[bp],ax       }
  334.       );
  335.     IF save_ax <> 0 THEN WriteLn('Exit code = ', save_ax);
  336. End;
  337.  
  338. procedure Zero;
  339.     begin
  340.        FillChar(zero1,ofs(zero2) - ofs(zero1) + sizeof(zero2), 0);
  341.     end;
  342.  
  343. procedure help(pos:Integer);
  344. { Read and display help.txt }
  345. const
  346.    filename = 'help.txt';
  347.  
  348. var
  349.    ch : char;
  350.    i  : Integer;
  351.  
  352. begin
  353.    if not exist(filename) then
  354.    begin
  355.       Make_Window(20,10,60,14,hf,hb);
  356.       writeln(' Help file ''help.txt'' not found.');
  357.       write(' Press any key...');
  358.       clock;
  359.       Ch := ReadKey;
  360.       Remove_Window
  361.    end else
  362.    begin
  363.       Make_Window(5,4,75,23,hf,hb);
  364.       i := 1;
  365.       assign(helpfile,filename);
  366.       reset(helpfile);
  367.       while not eof(helpfile) do
  368.       begin
  369.          seek(helpfile,pos-1);
  370.          read(helpfile,trec);
  371.             fwrite(7,i+3,hb*16+hf,trec.fString);
  372.          i := succ(i);
  373.          pos := succ(pos);
  374.          if i > 15 then
  375.          begin
  376.             i := 1;
  377.             writeln;
  378.                fwrite(10,21,hb*16+4,'Press "-" or "+" or ESC to exit...');
  379.             gotoxy(47,18);
  380.             clock;
  381.             repeat
  382.                Ch := ReadKey;
  383.             until ch in ['-','+',ESC];
  384.             clrscr;
  385.             if ch = '-' then pos := pos - 30;
  386.             if pos < 1 then pos := 1;
  387.             if ch = ESC then
  388.             begin
  389.                close(helpfile);
  390.                textbackground(b);
  391.                Remove_Window;
  392.                exit
  393.             end;
  394.             clrscr;
  395.          end;
  396.       end;
  397.          fwrite(10,21,hb*16+4,'Press any key to exit help...');
  398.       gotoxy(35,18);
  399.       clock;
  400.       Ch := ReadKey;
  401.       close(helpfile);
  402.       textbackground(b);
  403.       Remove_Window;
  404.    end;
  405. end;
  406.  
  407. procedure setprn(var c:char; var can:char);
  408. { Set up printer }
  409. var
  410.    d : text;
  411.    ch : char;
  412.  
  413. begin
  414.    assign(d,prnfile);
  415.    rewrite(d);
  416.    make_window(30,10,50,18,f,b);
  417.    writeln;
  418.    writeln(' 1 - Epson');
  419.    writeln(' 2 - Okidata');
  420.    repeat
  421.       Ch := ReadKey;
  422.    until ch in ['1'..'3'];
  423.    case ch of
  424.       '1': begin
  425.               preset     := #27+#69;
  426.               normal     := #27+#69;
  427.               expanded   := #14;
  428.            end;
  429.       '2': begin
  430.               preset     := #24;
  431.               normal     := #30;
  432.               expanded   := #31;
  433.            end;
  434.   end; { Case }
  435.   writeln(d,preset);
  436.   writeln(d,normal);
  437.   writeln(d,expanded);
  438.   writeln(d,can);
  439.   close(d);
  440.   remove_window
  441. end;
  442.  
  443. procedure loadprn(var c:char; var can:char);
  444. var
  445.    d : text;
  446.  
  447. begin
  448.    if exist(prnfile) then
  449.    begin
  450.       assign(d,prnfile);
  451.       reset(d);
  452.       readln(d,preset);
  453.       readln(d,normal);
  454.       readln(d,expanded);
  455.       close(d);
  456.    end else
  457.    begin
  458.       c := #29;    { Okidata Compress Code By Default }
  459.       can := #30   { Okidata Cancel Code }
  460.    end;
  461. end;
  462.  
  463. { -------------------------------------------------------- }
  464. procedure display_colors(n:Integer);
  465. var
  466.    i : Integer;
  467. begin
  468.    writeln;
  469.    textbackground(black);
  470.    for i := 1 to n do
  471.    begin
  472.       textcolor(i);
  473.       write(i:3)
  474.    end;
  475.    textcolor(15);
  476.    writeln
  477. end;
  478.  
  479. procedure save_setupfile;
  480. var
  481.    textfile : text;
  482.  
  483. begin
  484.    assign(textfile,setupfile);
  485.    rewrite(textfile);
  486.    writeln(textfile,title);
  487.    writeln(textfile,f);
  488.    writeln(textfile,b);
  489.    writeln(textfile,wf1);
  490.    writeln(textfile,fc);
  491.    writeln(textfile,wb1);
  492.    writeln(textfile,wf2);
  493.    writeln(textfile,wb2);
  494.    writeln(textfile,lfg);
  495.    writeln(textfile,lbg);
  496.    writeln(textfile,bar_color);
  497.    writeln(textfile,pattern);
  498.    writeln(textfile,hf);
  499.    writeln(textfile,hb);
  500.    writeln(textfile,pr);
  501.    close(textfile);
  502. end;
  503.  
  504. procedure clear_windows;
  505. var
  506.    i : Integer;
  507.  
  508. begin
  509.    for i := 1 to 5 do
  510.    remove_window
  511. end;
  512.  
  513. function free(dr:char):real;
  514. { Compute free disk space }
  515. var
  516.    reg:registers;
  517.  
  518. begin
  519.    with reg do
  520.    begin
  521.       ah := $36;              { DOS function number }
  522.       case upcase(dr) of
  523.          'A': dl := $01;
  524.          'B': dl := $02;
  525.          'C': dl := $03;
  526.          else dl := $00;      { drive number : 00=default, 01=A, 02=B, etc.}
  527.       end;
  528.       MSDOS(reg);             { call DOS }
  529.       free := 1.0*ax*bx*cx    { multiply by 1.0 to create a real value}
  530.    end;
  531. end;
  532.  
  533. procedure logo;
  534.  
  535. var
  536.    i : Integer;
  537.    line : String60;
  538.  
  539. begin
  540.    textbackground(lbg);
  541.    textcolor(lfg);
  542.    window(5,2,75,9);
  543.    clrscr;
  544.    gotoxy(1,4);
  545.    writeln('  ',title);
  546.    window(1,1,79,25);
  547.    line := Strings(60,#176);
  548.    for i := 10 to 23 do
  549.       fwrite(10,i,pattern,line);
  550.    textcolor(white);
  551.    textbackground(black);
  552. end;
  553.  
  554. procedure display_size;
  555. var
  556.    n : real;
  557.    s : Integer;
  558.    num : String10;
  559.  
  560. begin
  561.    n := filesize(d);
  562.    str(n:4:0,num);
  563.    fwrite(6,6,lbg*16+lfg,'Number of records = '+num);
  564.    s := sizeof(rec) * round(n);
  565.    str(s:7,num);
  566.    fwrite(6,7,lbg*16+lfg,'Database size =  '+num+' bytes');
  567.    n := free(' ');
  568.    str(n:8:0,num);
  569.    fwrite(38,6,lbg*16+lfg,'Free disk space = '+num+' bytes   ');
  570. end;
  571.  
  572. procedure main_menu;
  573. begin
  574.    clear_windows;
  575.    TextBackground(Black);
  576.    ClrScr;
  577.    logo;
  578.    Make_Window(16,13,38,22,wf1,wb1);
  579.    textcolor(fc);    write('  F1: ');
  580.    textcolor(wf1);   writeln('Help');
  581.    textcolor(fc);    write('  F2: ');
  582.    textcolor(wf1);   writeln('Printer setup');
  583.    textcolor(fc);    write('  F3: ');
  584.    textcolor(wf1);   writeln('Colors');
  585.    textcolor(fc);    write('  F4: ');
  586.    textcolor(wf1);   writeln('Clock On/Off');
  587.    textcolor(fc);    write('  F5: ');
  588.    textcolor(wf1);   writeln('Sort');
  589.    textcolor(fc);    write('  F6: ');
  590.    textcolor(wf1);   writeln('Shrink');
  591.    textcolor(fc);    write('  F7: ');
  592.    textcolor(wf1);   writeln('Backup Data');
  593.    textcolor(fc);    write('  ESC');
  594.    textcolor(wf1);   write('-Exit ');
  595.    Make_Window(41,13,63,22,wf2,wb2)
  596. end;
  597.  
  598. { -------------------------------------------------------- }
  599. Procedure Display_Choices(n:Integer);
  600. var
  601.    i, x, y : Integer;
  602. begin
  603.    x := 1;
  604.    y := 1;
  605.    if Color_Monitor then textbackground(b);
  606.    clrscr;
  607.    for i := 1 to n do
  608.    begin
  609.       y := y + 1;
  610.       if y > 16 then
  611.       begin
  612.          x := x + 19;
  613.          y := 2
  614.       end;
  615.    gotoxy(x,y);
  616.       writeln(' '+Menu[i],spaces(18-length(menu[i])));
  617.    end;
  618. end;
  619.  
  620. procedure get_colors;
  621. var
  622.    temp : String60;
  623.    i : Integer;
  624.    q, up : boolean;
  625.  
  626. begin
  627.    Make_Window(1,5,79,20,white,black);
  628.    temp := '';
  629.    textcolor(white);
  630.    textbackground(black);
  631.    Writeln('Title - ',title,' --> ');
  632.    EditLine(temp,60,wherex,wherey,LegalChars,Term,Tc);
  633.    if (temp <> title) and (temp <> '') then title := temp;
  634.    temp := '';
  635.    display_colors(15);
  636.    if lfg = black then textcolor(white) else
  637.    textcolor(lfg);
  638.    write('Title text color ',lfg:2,' --> ');
  639.    getintval(lfg,wherex,wherey,up,q);
  640.    display_colors(7);
  641.    textcolor(lbg);
  642.    write('Title background color ',lbg:2,' --> ');
  643.    getintval(lbg,wherex,wherey,up,q);
  644.    display_colors(15);
  645.    textcolor(wf1);
  646.    write('Left window text color ',wf1:2,' --> ');
  647.    getintval(wf1,wherex,wherey,up,q);
  648.    display_colors(15);
  649.    textcolor(fc);
  650.    write('Left window function key color ',fc:2,' --> ');
  651.    getintval(fc,wherex,wherey,up,q);
  652.    display_colors(7);
  653.    textcolor(wb1);
  654.    repeat
  655.       write('left window background color ',wb1:2,' --> ');
  656.       getintval(wb1,wherex,wherey,up,q);
  657.       writeln;
  658.    until wb1 in [0..7];
  659.    display_colors(15);
  660.    textcolor(wf2);
  661.    write('Right window text color ',wf2:2,' --> ');
  662.    getintval(wf2,wherex,wherey,up,q);
  663.    repeat;
  664.       writeln;
  665.       display_colors(7);
  666.       textcolor(wb2);
  667.       write('Right window background color ',wb2,' --> ');
  668.       getintval(wb2,wherex,wherey,up,q);
  669.    until wb2 in [0..7];
  670.    display_colors(15);
  671.    textcolor(bar_color);
  672.    write('Slide Bar color ',bar_color:2,' --> ');
  673.    getintval(Bar_color,wherex,wherey,up,q);
  674.    textcolor(pattern);
  675.    display_colors(15);
  676.    write('Pattern Color ',pattern:2,' --> ');
  677.    getintval(pattern,wherex,wherey,up,q);
  678.    display_colors(15);
  679.    write('Help window foreground color ',hf:2,' --> ');
  680.    getintval(hf,wherex,wherey,up,q);
  681.    display_colors(7);
  682.    write('Help window background color ',hb:2,' --> ');
  683.    getintval(hb,wherex,wherey,up,q);
  684.    Save_SetupFile;
  685.    for i := 1 to 3 do Remove_Window;
  686.    main_menu;
  687.    Display_Choices(3);
  688. end;
  689.  
  690.  
  691. procedure configure;
  692. var
  693.    textfile : text;
  694.    i : Integer;
  695.  
  696. begin
  697.    if exist(setupfile) then
  698.    begin
  699.       assign(textfile,setupfile);
  700.       reset(textfile);
  701.       readln(textfile,title);
  702.       readln(textfile,f);
  703.       readln(textfile,b);
  704.       readln(textfile,wf1);
  705.       readln(textfile,fc);
  706.       readln(textfile,wb1);
  707.       readln(textfile,wf2);
  708.       readln(textfile,wb2);
  709.       readln(textfile,lfg);
  710.       readln(textfile,lbg);
  711.       readln(textfile,bar_color);
  712.       readln(textfile,pattern);
  713.       readln(textfile,hf);
  714.       readln(textfile,hb);
  715.       readln(textfile,pr);
  716.       close(textfile);
  717.    end else
  718.    begin
  719.       clear_windows;
  720.       clrscr;
  721.       get_colors
  722.    end;
  723. end;
  724.